<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>人力资源管理系统登录</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/jquery-easyui-1.3.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/jquery-easyui-1.3.3/themes/icon.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/main.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/software.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui-1.3.3/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>
 <script>
   var u=true;
   var p=true;
   function checkname(){
	   if($('#username').val()==""){
           $('#uid').text("用户名为空！");
           $('#uid').css("color",'red');
           u=false;
       }
   }
   function check(){
	   checkname();
	   checkpassword();
	   if(u&&p){
		   return true;
	   }
	   return false;
   }
   function removename(){
	   $('#uid').text("");
	   u=true;
   }
   function checkpassword(){
	   if ($('#password').val()==""){
           $('#pid').text("密码为空！");
           $('#pid').css("color",'red');
           p=false;
       }
   }
   function removepsd(){
	   $('#pid').text("");
	   p=true;
   }
   $(function(){
	    //文档加载完成执行检验
	   if('${error}'!=''){
			//alert('${errorMsg}');
		$.messager.alert("系统提示",'${error}');
		}

	});
    </script>
</head>

<!-- 浏览器主界面1366*730
	网页界面1349*620
	
 -->
<body>
<div class="main" >
    <div class="register" >
        <div class="layui-row">
            <p class="creat">登录</p>
        </div>
        <div class="layui-row">
            <form id="ff" action="${pageContext.request.contextPath}/admin/login.action" onsubmit="return check()" method="post">
                <div class="rows">
                    <label  class="name">用 户 名:
                        <input id="username" name="name"  value="${admin.name }" class="" type="text" placeholder="用户名" onblur="checkname()" onfocus="removename()">
                    </label>
                    <div class="Prompt" id="uid" >
                    </div>
                </div>
                <div class="rows">
                    <label class="password" >密 码:
                        <input id="password"  name="password"  value="${admin.password }"  type="password" placeholder="输入密码" onblur="checkpassword()" onfocus="removepsd()"> 
                    </label>
                    <div class="Prompt" id="pid" ></div>
                </div>
                <div class="submit_btn">
                    <input type="submit" value="登录" class="btn">
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
